@import "../variables.scss";

/** 弹出菜单 */
.sc-popper {
    background-color: $bgColorLight;
    box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.5);
    padding: 8px;
}

.sc-popper-transparent {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
}

.sc-popper,
.sc-popper-transparent {
    border: none;
    color: $text;

    // v-loading 取消背景
    .el-loading-mask {
        background-color: transparent;
    }

    &[x-placement^="left"] {

        .popper__arrow,
        .popper__arrow::after {
            border-left-color: $bgColorLight;
            border-top-color: transparent !important;
            border-bottom-color: transparent !important;
            border-right-color: transparent !important;
        }
    }

    &[x-placement^="top"] {

        /** 弹出层的箭头 */
        .popper__arrow,
        .popper__arrow::after {
            border-bottom-color: transparent !important;
            border-top-color: $bgColorLight;
            border-left-color: transparent !important;
            border-right-color: transparent !important;
        }
    }

    &[x-placement^="bottom"] {

        /** 弹出层的箭头 */
        .popper__arrow,
        .popper__arrow::after {
            border-bottom-color: $bgColorLight;
            border-top-color: transparent !important;
            border-left-color: transparent !important;
            border-right-color: transparent !important;
        }
    }

    ul.sc-popper_list {
        li {
            color: $text;
            font-size: 12px;
            line-height: 30px;

            &:hover {
                color: $green;
            }
        }
    }

    // 弃用，应该使用 :visible-arrow="false"
    &.no-arrow {
        .popper__arrow {
            display: none;
        }

        .el-select-dropdown__item {
            height: auto;
        }

        &[x-placement^="left"] {
            margin-right: 2px;
        }

        &[x-placement^="top"] {
            margin-top: 12px;
        }

        &[x-placement^="bottom"] {
            margin-top: 2px;
        }
    }
}

.el-popper.sc-popper {
    .sc-text-info {
        color: #5e6270;
    }
}

/* 像弹窗一样的弹出层 参考 TagsPop.vue */
.sc-layer {
    background: $bgColorLight;
    border-radius: 4px;
    color: #aeb1c0;
}

.sc-layer,
[class*="sc-dialog"],
.el-popper.sc-popper {
    .el-loading-mask {
        background-color: transparent;
    }
}